package com.yidu.hbats.service.NutritionAtsScheme;

import com.yidu.hbats.dao.AtsSchemeAthleteMapper;
import com.yidu.hbats.model.AtsSchemeAthlete;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


/**
 * @描述：营养方案实现类  方案对应的运动员表
 * @backage: com.liandyao.hbats.dao
 * @Author: 元气轩轩
 * @create: 2019-11-25 16:38
 */

@Service
public class NutritionAtsSchemeAthleteServiceImpl implements NutritionAtsSchemeAthleteService{

    //方案对应的运动员表
    @Resource
    AtsSchemeAthleteMapper atsSchemeAthleteMapper;

    /**
     * 新增
     * @param record
     */
    @Override
    public void insertSelective(AtsSchemeAthlete record) {

        atsSchemeAthleteMapper.insertSelective(record);
    }

    /**
     * 根据方案id查询运动员
     * @param schemeId 主键id
     * @return
     */
    @Override
    public List<AtsSchemeAthlete> selectByIdone(int schemeId) {

        return atsSchemeAthleteMapper.selectByIdone(schemeId);
    }

    /**
     * 逻辑删除
     * @param atsSchemeAthlete
     * @return
     */
    @Override
    public int updateByPrimaryKeySelectivethree(AtsSchemeAthlete atsSchemeAthlete) {
        return atsSchemeAthleteMapper.updateByPrimaryKeySelectivethree(atsSchemeAthlete);
    }

    /**
     * 根据id进行修改
     * @param schemeId 主键id
     * @return
     */
    @Override
    public int updateByPrimaryKeySelectiveFour(int schemeId) {
        return atsSchemeAthleteMapper.updateByPrimaryKeySelectiveFour(schemeId);
    }

    @Override
    public int updateByPrimaryKeySelectiveZero(AtsSchemeAthlete atsSchemeAthlete) {
        return atsSchemeAthleteMapper.updateByPrimaryKeySelectiveZero(atsSchemeAthlete);
    }
}
